﻿using System.Net;

namespace SDCloudSolution.SDCloud.WebApi.Exceptions
{
    /// <summary>
    /// Exception that raise when api can't find any required parameter in request.
    /// </summary>
    public class RequiredParameterWebApiException : BaseSDCloudWebApiException
    {
        private const string ExceptionMessage = "Parameter in this method should be specified";

        /// <summary>
        /// Initializes a new instance of the <see cref="RequiredParameterWebApiException"/> class.
        /// </summary>
        /// <param name="parameterName">Name of the parameter.</param>
        public RequiredParameterWebApiException(string parameterName)
            : base(HttpStatusCode.BadRequest, ExceptionMessage, parameterName)
        {
            
        }
    }
}